package com.clarence.dada.modular.system.config.entity.req;

import com.clarence.dada.core.base.BaseReq;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 系统参数配置参数
 *
 * @author GD
 * @since  2020/4/14 10:18
 */
@Data
@Schema(title = "系统参数配置请求实例")
@EqualsAndHashCode(callSuper = true)
public class SysConfigReq extends BaseReq {

    /**
     * 主键
     */
    @NotNull(message = "configId不能为空", groups = {edit.class, delete.class, detail.class})
    @Schema(title = "主键", example = "1")
    private Long configId;

    /**
     * 名称
     */
    @NotBlank(message = "名称不能为空", groups = {add.class, edit.class})
    @Schema(title = "名称", example = "1")
    private String configName;

    /**
     * 编码
     */
    @NotBlank(message = "编码不能为空", groups = {add.class, edit.class})
    @Schema(title = "编码", example = "1")
    private String configCode;

    /**
     * 配置值
     */
    @NotBlank(message = "配置值不能为空", groups = {add.class, edit.class})
    @Schema(title = "配置值", example = "1")
    private String configValue;

    /**
     * 是否是系统参数：Y-是，N-否
     */
    @NotBlank(message = "是否是系统参数不能为空", groups = {add.class, edit.class})
    @Schema(title = "是否系统参数", example = "1")
    private String sysFlag;

    /**
     * 备注
     */
    @Schema(title = "备注", example = "1")
    private String remark;

    /**
     * 状态：1-正常，2停用
     */
    @Schema(title = "状态", example = "1")
    private Integer statusFlag;

    /**
     * 常量所属分类的编码，来自“常量的分类”字典
     */
    @NotBlank(message = "常量所属分类的编码不能为空", groups = {add.class, edit.class})
    @Schema(title = "常量所属分类的编码", example = "1")
    private String groupCode;

}
